package com.example.single;

/**
 * description: HungerSingleton <br>
 * date: 2020/7/24 13:23 <br>
 *
 * @author: ZhangYixin <br>
 * version: 1.0 <br>
 */
public class HungerSingleton {

    public static HungerSingleton outInstance = new HungerSingleton();

    public static HungerSingleton getInstance(){
        return outInstance;
    }

    private HungerSingleton(){

    }


    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Thread(()->{
                System.out.println(HungerSingleton.getInstance());
            }).start();
        }
    }
}
